import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:photo_frame/main.dart';

class AppLocalizationsWrapper {
  static AppLocalizationsWrapper instance = AppLocalizationsWrapper._();
  AppLocalizationsWrapper._();

  AppLocalizations unwrap(BuildContext context) {
    return unwrapNoCtx();
  }

  AppLocalizations unwrapNoCtx() {
    return AppLocalizations.of(App.globalCxt)!;
  }
}

AppLocalizations appLocal() {
  return AppLocalizationsWrapper.instance.unwrapNoCtx();
}

AppLocalizations appLocalForContext(BuildContext context) {
  return AppLocalizations.of(context)!;
}
